<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录页面</title>
</head>

<body>
    <div class="container">
        请输入用户名： <input type="text" class="username">
        <br>
        请输入密码： <input type="password" class="password">
        <br />
        <button class="reset">重填</button>
        <button class="login">登录</button>
    </div>
    <script>
        const reset = document.querySelector('.reset')
        const username = document.querySelector('.username')
        const password = document.querySelector('.password')
        const container = document.querySelector('.container')
        const login = document.querySelector('.login')
        reset.addEventListener('click', () => {
            username.value = ""
            password.value = ""
        })
        login.addEventListener('click', () => {
            container.innerHTML = 'welcome! zhangsan'
        })
    </script>
</body>

</html>